package com.source.syslog.mapper;

import com.source.syslog.entity.Operation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author IceBerg777
 * @since 2021-04-11
 */
@Repository
public interface OperationMapper extends BaseMapper<Operation> {

    String SELECT = "SELECT * FROM `operation` where 1 = 1   ";

    @Select(SELECT + "AND CONCAT_WS(',',id,userId,clientIp,loginName, operUrl, operEvent, operType) LIKE #{keyWord}")
    List<Operation> findByKeyWord(String keyWord);
}
